<?php /* Smarty version 2.6.20, created on 2017-04-12 22:12:35
         compiled from admin_main_p.htm */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'number_format', 'admin_main_p.htm', 10, false),array('insert', 'label', 'admin_main_p.htm', 50, false),)), $this); ?>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="main_buyer">
    <div class="wrap_buyer">
    	<div class="layout_l">
        	<div class="member_info">
                <dl>
                	<dt>用户名: <a href="main.php?m=member&s=admin_member"><?php echo $this->_tpl_vars['cominfo']['name']; ?>
</a>&nbsp;(<?php echo $_COOKIE['USER']; ?>
)</dt>
                    <!--<dd>-->
					<!--账户余额<span class="price"><?php echo ((is_array($_tmp=$this->_tpl_vars['cash'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : number_format($_tmp, 2)); ?>
</span>元-->
					<!--<a href="main.php?m=payment&s=admin_accounts_bind">提现</a>-->
					<!--<a href="main.php?m=payment&s=admin_accounts_cashflow">明细</a>-->
					<!--</dd>-->
                </dl>
                <ul>
                    <li class="<?php if ($this->_tpl_vars['shop_count']['order']['0']): ?>yes<?php else: ?>no<?php endif; ?>"><a href="main.php?m=product&s=admin_buyorder&status=1">待付款订单&nbsp;(<strong><?php echo $this->_tpl_vars['shop_count']['order']['0']; ?>
</strong>)</a></li>
                    <li class="<?php if ($this->_tpl_vars['shop_count']['order']['2']): ?>yes<?php else: ?>no<?php endif; ?>"><a href="main.php?m=product&s=admin_buyorder&status=4">待评价交易&nbsp;(<strong><?php echo $this->_tpl_vars['shop_count']['order']['2']; ?>
</strong>)</a></li>
                </ul>
            	<div class="clear"></div>
            </div>
            <div class="ad565"><script src='<?php echo $this->_tpl_vars['config']['weburl']; ?>
/api/ad.php?id=16&catid=<?php echo $_GET['id']; ?>
&name=<?php echo $_GET['key']; ?>
'></script></div>

        </div>
        
    	<div class="layout_r">


            <div class="right_module">            
                <form class="right_module_title">
                    <fieldset><legend>热门活动</legend></fieldset>
                </form>
                <div class="right_module_content ad174">
					<script src='<?php echo $this->_tpl_vars['config']['weburl']; ?>
/api/ad.php?id=14&catid=<?php echo $_GET['id']; ?>
&name=<?php echo $_GET['key']; ?>
'></script>
                </div>
            </div>
            
            <div class="right_module">            
                <form class="right_module_title">
                    <fieldset><legend>热门商品推荐</legend></fieldset>
                </form>
                <div class="right_module_content ad174">
					<script src='<?php echo $this->_tpl_vars['config']['weburl']; ?>
/api/ad.php?id=15&catid=<?php echo $_GET['id']; ?>
&name=<?php echo $_GET['key']; ?>
'></script>
                </div>
            </div>
            <!--<div class="right_module">            -->
                <!--<form class="right_module_title">-->
                    <!--<fieldset><legend>公告栏</legend></fieldset>-->
                <!--</form>-->
                <!--<div class="right_module_content con">-->
                <!--<?php require_once(SMARTY_CORE_DIR . 'core.run_insert_handler.php');
echo smarty_core_run_insert_handler(array('args' => array('name' => 'label', 'type' => 'announcement', 'temp' => 'notice_list', 'limit' => 5)), $this); ?>
-->
                <!--</div>-->
            <!--</div>-->
        </div>
        <div class="clear"></div>
    </div>
</div>
<script>

if("<?php echo $this->_tpl_vars['pay_re']['pay_uid']; ?>
" == ''){
	message_confirm("confirm", "设置提示", "您的支付账户还未设置，赶快去设置吧，以免支付时受影响", 270, 0);
}



//显示分享产品页面	
$('#snssharegoods').click(function(){	
	ajax_form("sharegoods", '<?php echo $this->_tpl_vars['lang']['share_buy_and_collection_of_baby']; ?>
', '<?php echo $this->_tpl_vars['config']['weburl']; ?>
/main.php?m=sns&s=sns&op=sharegoods', 500);
	return false;
});
$("#content").charCount({
	allowed: 140,
	warning: 10,
	counterContainerID:'weibo',
	firstCounterText:'还可以输入<span>',
	endCounterText:'</span>字',
	errorCounterText:'已经超出<span>'
});
$("[data_type='sns_forward']").live('click',function(){
	var data = $(this).attr('data-param');
	eval("data = "+data);
	ajax_form("forward_form", '<?php echo $this->_tpl_vars['lang']['forwarding']; ?>
', '<?php echo $this->_tpl_vars['config']['weburl']; ?>
/main.php?m=sns&s=sns&op=forward&bid='+data.bid, 500);
	return false;
});
$("[data_type='sns_comment']").live('click',function(){
	var data = $(this).attr('data-param');
	eval("data = "+data);
	ajax_form("comment_form", '评论', '<?php echo $this->_tpl_vars['config']['weburl']; ?>
/main.php?m=sns&s=sns&op=comment&bid='+data.bid, 500);
	return false;
});
$("[data_type='fd_del']").live('click',function(){
	message_confirm("confirm", "", "确认要删除这条微博吗?", 270, 0)
	var data_str = $(this).attr('data-param');
	eval("data_str = "+data_str);
	$(".btn1").live('click',function(){	
		var url = "<?php echo $this->_tpl_vars['config']['weburl']; ?>
/main.php?m=sns&s=sns";
		var pars = 'bid='+data_str.bid+'&op=del';
		$.post(url, pars,showResponse);
		function showResponse(originalRequest)
		{
			message_notice('notice', '<?php echo $this->_tpl_vars['lang']['message']; ?>
', '<?php echo $this->_tpl_vars['lang']['deleted_successfully']; ?>
', 270, 0)
			function closefunc()
			{
				DialogManager.close("notice");
				$('#friendtrace').lazyshow({url:"main.php?m=sns&s=sns&curpage=1",'iIntervalId':true});
			}
			setTimeout(closefunc,1000);
		}
	});
});
$("#shareform").bind('keyup',function(){	
	var text=$("#content").val();
	if(text)
	{
		$("#btn").attr('disabled','');
		$("#btn").addClass('nbg');	
	}
	else
	{
		$("#btn").attr('disabled','disabled');
		$("#btn").removeClass('nbg');	
	}
})
function $$(id) {
	return !id ? null : document.getElementById(id);
}
$("#btn").bind('click',function(){		
	formid='shareform';
	var ajaxframeid = 'ajaxframe';
	var ajaxframe = $$(ajaxframeid);
	if(!ajaxframe){
		var div = document.createElement('div');
		div.style.display = 'none';
		div.innerHTML = '<iframe name="' + ajaxframeid + '" id="' + ajaxframeid + '" loading="1"></iframe>';
		ajaxframe = $$(ajaxframeid);
		$$('append_parent').appendChild(div);
	}
	$$(formid).target = ajaxframeid;

	$('#'+formid).validate({
		errorPlacement: function(error, element){
			element.next('.form-error').append(error);
		},  
		rules : {
			content : {
				required:true,
				maxlength : 140
			}
		},
		messages : {
			content : {
				required: '不能为空!',
				maxlength: '不能超过140字'
			}
		}, 
		submitHandler:function(form){  
			form.submit();
			function closefunc()
			{
				$("#content").val('');
				DialogManager.close("notice");
				$('#friendtrace').lazyshow({url:"main.php?m=sns&s=sns&curpage=1",'iIntervalId':true});
			}
			var d = DialogManager.create('notice');
			d.setTitle('<?php echo $this->_tpl_vars['lang']['message']; ?>
');
			d.setContents('message', { type: 'notice', text: "<?php echo $this->_tpl_vars['lang']['share_successful']; ?>
" });
			d.setWidth(270);
			d.show('center');
			setTimeout(closefunc,800);
		}
			
	});
});
$('#friendtrace').lazyinit();
$('#friendtrace').lazyshow({url:"main.php?m=sns&s=sns&curpage=1",'iIntervalId':true});
</script>